<?php

namespace pam\Service;

/**
 * Description of PolicyService
 *
 * @author Robert Bwana <robert.bwana@ssra.go.tz>
 */

use pam\Service\PolicyServiceInterface;
use pam\Service\IndicatorsServiceInterface;
use pam\Model\PolicyStatement;
use pam\Model\Indicator;
use pam\Mapper\SocialPolicyDataAccess as spda;

class SocialPolicyService implements PolicyServiceInterface{
    protected $socialPolicyDA;
    
    public function __construct(spda $dataAccess) {
        $this->socialPolicyDA = $dataAccess;
    }
    
    public function deletePolicy(PolicyStatement $policy) {
        return $this->socialPolicyDA->delete($policy->getId());
    }

    public function findAll() {
        return $this->socialPolicyDA->findAll();
    }

    public function findPolicy($id) {
        return $this->socialPolicyDA->find($id);
    }

    public function savePolicy(PolicyStatement $policy) {
        return $this->socialPolicyDA->save($policy);
    }
    
}
